// pages/Cprofile/Cprofile.js
Page({

  /**
   * 页面的初始数据
   */
  data: {

    prenext: "../Business/Business",
    preprve: "../Ourteam/Ourteam",
    page: 4,
    cptitle: {
      zw: "发展历程",
      yw: "Development History"
    },
    startpoint: [],
    movePoint: [],
    opacitycontainer: {},

  },

  touchstartfun: function (e) {
    var that = this;
    //开始触摸，获取触摸坐标
    that.setData({
      startpoint: [e.touches[0].pageX, e.touches[0].pageY]
    });
  },
  touchmovefun: function (e) {
    //触摸移动中，获取触摸坐标
    var that = this;
    that.setData({
      movePoint: [e.touches[0].pageX, e.touches[0].pageY]
    });
    var startY = this.data.startpoint[1];
    var moveY = this.data.movePoint[1];
    
  },
  touchendfun: function (e) {
    var that = this;
    var startY = this.data.startpoint[1];
    var moveY = this.data.movePoint[1];
    if (startY - moveY > 80) {
      wx.reLaunch({
        url: that.data.prenext
      })
    }
    else if (startY - moveY < -80) {
      wx.reLaunch({
        url: that.data.preprve
      })
    }
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {

  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {
    this.setData({
      bg1leftstyle: "bg1leftstyle",
      bg234left: "bg234left", 
      bgotstyle: "bgotstyle",
      bgotimgstyle: "bgotimgstyle",
      line2style: "line2style",
      styleArr: ["titlestyle","textstyle"],
      bottomdata: {
        page: 4,
        styleArr: ["bottomstyleArr1", "bottomstyleArr2", "viewstyleArr"]
      },
      cptitle: {
        cptitlestyle: "cptitlestyle",
        zw: "发展历程",
        yw: "Development History"
      },
    })
  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})